FIX: AIRTInitializer container crash and parameters.example.json typo#1648
Merged
varunj-msft merged 1 commit intomicrosoft:mainfrom Apr 27, 2026
Conversation
romanlutz
reviewed
Apr 24, 2026
romanlutz
approved these changes
Apr 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes two pre-existing bugs blocking Azure Container App deployments on current main.
AIRTInitializer crashes with FileNotFoundError when .pyrit_conf is missing. PR #1578 added _validate_operation_fields() which unconditionally opens ~/.pyrit/.pyrit_conf. This file does not exist in container deployments. The fix checks if the file exists before reading it, and skips gracefully in container/GUI mode where operator/operation are set per-user at runtime (PR #1636). This unblocks the test environment where new revisions have been ActivationFailed since Apr 10.
infra/parameters.example.json has "targets airt" but the valid initializer name is "target" (no s). Fixed the typo. Does not affect the pipeline (uses Bicep default) but would break manual deployments following the example.
Related to User Story #8520
Tests and Documentation
Added 4 unit tests for _validate_operation_fields():
test_validate_operation_fields_skips_when_pyrit_conf_missing
test_validate_operation_fields_preserves_existing_labels_when_pyrit_conf_missing
test_validate_operation_fields_merges_conf_into_labels
test_validate_operation_fields_does_not_overwrite_existing_labels
All 18 airt initializer tests pass. All 180 setup module tests pass. Ruff lint and format clean. E2E validated: backend starts with --initializers target airt and no .pyrit_conf, health check passes.
No documentation changes needed. No JupyText changes.